import request from '@/utils/request'

// 查询速卖通商品价格调整任务列表
export function listAeProductDiscountAdjustmentTask(query) {
  return request({
    url: '/gather/aeProductDiscountAdjustmentTask/list',
    method: 'get',
    params: query
  })
}

// 查询速卖通商品价格调整任务详细
export function getAeProductDiscountAdjustmentTask(id) {
  return request({
    url: '/system/aeProductDiscountAdjustmentTask/' + id,
    method: 'get'
  })
}

// 新增速卖通商品价格调整任务
export function addAeProductDiscountAdjustmentTask(data) {
  return request({
    url: '/gather/aeProductDiscountAdjustmentTask/addTaskByType',
    method: 'get',
    params: data
  })
}

// 重新调价
export function anewDisposeTask(data) {
  return request({
    url: '/gather/aeProductDiscountAdjustmentTask/productDiscountAdjustmentBySelf',
    method: 'get',
    params: data
  })
}

// 数据回滚
export function dataRollback(data) {
  return request({
    url: '/gather/aeProductDiscountAdjustmentTask/dataRollback',
    method: 'get',
    params: data
  })
}

// 修改速卖通商品价格调整任务
export function updateAeProductDiscountAdjustmentTask(data) {
  return request({
    url: '/system/aeProductDiscountAdjustmentTask',
    method: 'put',
    data: data
  })
}

// 删除速卖通商品价格调整任务
export function delAeProductDiscountAdjustmentTask(id) {
  return request({
    url: '/system/aeProductDiscountAdjustmentTask/' + id,
    method: 'delete'
  })
}

// 查看当前商品是否上架
export function selCollectProductStatus(data) {
  return request({
    url: '/gather/aeProductDiscountAdjustmentTask/selCollectProductStatus',
    method: 'get',
    params: data
  })
}
